package gregorytersoff_controller;

import gregorytersoff_boundary.DecisionlinesGUI;

public class ErrorController {
	private String errortext;
	//private Model model;
	private DecisionlinesGUI frame;
	/**
	 * updates the error message displayed based on what error, or lack therof, just occurred. Is called by other controllers, and never called
	 * if the final result is already displayed.
	 * @param errtext the text to set the error message to
	 * @param f the frame containing the label to reset the text of
	 */
	public ErrorController(String errtext, DecisionlinesGUI f)
	{
		errortext = errtext;
		//model = m;
		frame = f;
	}

	/**
	 * tells the frame to set the text of the JLabel containing the error message to that of the string stored in this class
	 */
	public void process()
	{
		frame.resetErrorText(errortext);
	}
}
